package com.manage.competition.repository;

import com.manage.competition.entity.AnswerPaper;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;

import java.util.List;

/**
 * Create with IDEA
 *
 * @Author: gitee.com/KamisamaXX
 * @Date: Create in 14:44 2019/4/9
 * @Description:
 */
public interface AnswerRepository extends JpaSpecificationExecutor<AnswerPaper>, JpaRepository<AnswerPaper,Long> {
    AnswerPaper findByUserIdAndQuestionsId(long userId,long questionId);

    List<AnswerPaper> findByCompetitionIdAndUserId(long competitionId,long userId);

}
